package com.kobeliu.api.feign;

import com.kobeliu.api.fallback.UsersMicroServiceFeignFallback;
import com.kobeliu.pojo.bo.SearchBO;
import com.kobeliu.pojo.vo.UsersVO;
import com.kobeliu.result.GraceJSONResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;


@FeignClient(value = "user-service",fallback = UsersMicroServiceFeignFallback.class)
public interface UsersMicroServiceFeign {

    @PostMapping("/userinfo/getCountByCompanyId")
    Long getCountByCompanyId(@RequestParam("companyId")String companyId);

    @PostMapping("/userinfo/bindingHRToCompany")
    GraceJSONResult bindingHRToCompany(@RequestParam("userId") String userId,@RequestParam("realName") String realName,@RequestParam("companyId")String companyId);

    @PostMapping("/userinfo/getInfo")
    public GraceJSONResult getInfo(@RequestParam("userId")String userId);

    @PostMapping("userinfo/changUser2Hr")
    public GraceJSONResult changUser2Hr(@RequestParam("hrUserId")String hrUserId);

    @PostMapping("userinfo/getUserInfos")
    GraceJSONResult getUserInfos(@RequestBody SearchBO searchBO);
}
